

import UIKit

class readarticleViewController: UIViewController
{

    var articleinfo:resourcejson? = nil
    var controlView:UIView!  //控制条视图
    var playBt:UIButton!
    var slider:UISlider!
    var timeLab:UILabel!
    var hideState:Bool = false
    var sliding:Bool = false
    var obser:Any! //监听器
    
    @IBOutlet weak var articletitle: UILabel!
    @IBOutlet weak var articlewebview: UIWebView!
    func Alarm()
    {
        let alarm=UIAlertController(title: "提示", message: "收藏，关注功能尚未上线", preferredStyle: .alert)
        alarm.addAction(UIAlertAction(title: "好", style: .cancel, handler: nil))
        self.present(alarm, animated: true, completion: nil)
    }

    override func viewDidLoad()
    {
        super.viewDidLoad()
        articletitle.text = articleinfo?.name
        articlewebview.loadHTMLString((articleinfo?.content)!, baseURL: nil)
        self.navigationController?.navigationBar.tintColor = UIColor.white
                self.navigationItem.rightBarButtonItem=UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(Alarm))
        // Do any additional setup after loading the view.
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
